<template>
    <div id="app">
        <Header />
        <!-- 路由组件的出口 -->
        <!-- 在HOME/Search显示，在Login/Register是隐藏的 -->
        <router-view></router-view>
        <Footer v-show="$route.meta.showFooter"></Footer>
    </div>
</template>

<script>
import Header from "./components/Header/index.vue";
import Footer from "./components/Footer/index.vue";
export default {
    name: "App",
    components: {
        Header,
        Footer,
    },
    mounted() {
        // 停止vuex发请求，获取数据，存储于仓库当中
        this.$store.dispatch("getCategoryList");
    },
};
</script>

<style>
#app {
}
</style>
